﻿#region copyright
//<copyright>
// Copyright(C) 2012 TrackerRealm Corporation
// This file is part of the open source project - Jazz. http://jazz.codeplex.com
// 
// Jazz is open software: you can redistribute it and/or modify it 
// under the terms of the GNU Affero General Public License (AGPL) as published by 
// the Free Software Foundation, version 3 of the License.
// 
// Jazz is distributed in the hope that it will be useful, 
// but WITHOUT ANY WARRANTY; without even the implied warranty 
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
//  See the GNU Affero General Public License (AGPL) for more details.
// 
// You should have received a copy of the GNU General Public 
// License along with Jazz.  If not, see <http://www.gnu.org/licenses/>.
//
// REMOVAL OF THIS NOTICE IS VIOLATION OF THE COPYRIGHT. 
//</copyright>
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Reflection;
using TrackerRealm.Jazz.Common;
using TrackerRealm.Jazz.Client;
using C = TrackerRealm.Jazz.Common.JazzConstants;
using F = TrackerRealm.Jazz.Common.Constants_JazzObjectFields;

namespace TrackerRealm.Jazz.Client.Services
{
    /// <summary>
    /// 
    /// </summary>
    public class jObjectFields
    {
        
        #region static constructor
        /// <summary>
        /// Static Constructor
        /// </summary>
        static jObjectFields()
        {
            jObjectFields.jObjectField_CurrentState = typeof(jObject).GetPrivateField(F.CURRENTSTATE);
            jObjectFields.jObjectField_PreviousState = typeof(jObject).GetPrivateField(F.PREVIOUSSTATE);
            jObjectFields.Id = typeof(jObject).GetPrivateField(F.ID);
            jObjectFields.Flags = typeof(jObject).GetPrivateField(F.FLAGS);
            jObjectFields.Status = typeof(jObject).GetPrivateField(F.STATUS);
            jObjectFields.StorageStatus = typeof(jObject).GetPrivateField(F.STORAGESTATUS);
            jObjectFields.Timestamp = typeof(jObject).GetPrivateField(F.TIMESTAMP);
            jObjectFields.Workspace = typeof(jObject).GetPrivateField(F.WORKSPACE);
            jObjectFields.Roles = typeof(jProfileBase).GetPrivateField(F.ROLES);
        }
        #endregion
        
        #region Static Properties
        /// <summary>
        /// Convenience property.  Returns the 'FieldInfo' for the the "currentState' field in the class 'jObject'.
        /// </summary>
        public static FieldInfo jObjectField_CurrentState { get; private set; }
        /// <summary>
        /// Convenience property.  Returns the 'FieldInfo' for the the "currentState' field in the class 'jObject'.
        /// </summary>
        public static FieldInfo jObjectField_PreviousState { get; private set; }
        /// <summary>
        /// Convenience property.  Returns the 'FieldInfo' for the the "workspace' field in the class 'jObject'.
        /// </summary>
        public static FieldInfo Workspace { get; private set; }
        /// <summary>
        /// Convenience property.  Returns the 'FieldInfo' for the the "id' field in the class 'jObject'.
        /// </summary>
        public static FieldInfo Id { get; private set; }
        /// <summary>
        /// Convenience property.  Returns the 'FieldInfo' for the the "flags' field in the class 'jObject'.
        /// </summary>
        public static FieldInfo Flags { get; private set; }
        /// <summary>
        /// Convenience property.  Returns the 'FieldInfo' for the the "status' field in the class 'jObject'.
        /// </summary>
        internal static FieldInfo Status { get; private set; }
        /// <summary>
        /// Convenience property.  Returns the 'FieldInfo' for the the "storageStatus' field in the class 'jObject'.
        /// </summary>
        public static FieldInfo StorageStatus { get; private set; }
        /// <summary>
        /// Convenience property.  Returns the 'FieldInfo' for the the "status' field in the class 'jObject'.
        /// </summary>
        public static FieldInfo Timestamp { get; private set; }
        /// <summary>
        /// Convenience property.  Returns the 'FieldInfo' for the the "roles' field in the class 'jProfileBase'.
        /// </summary>
        public static FieldInfo Roles { get; private set; }
        #endregion
        
    }
}
